package com.project.internship.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.internship.entity.Teacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.internship.vo.TeacherDeptVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2020-04-06
 */
@Repository
public interface TeacherMapper extends BaseMapper<Teacher> {

    IPage<Teacher> getAllTeachers(Page<Teacher> page, @Param("departmentId") Integer departmentId,@Param("keyword") String keyword);

    List<Teacher> getNonTeacherName(@Param("departmentId") Integer departmentId, @Param("year") String year);

    String getTeacherNameById(Integer id);

    List<Teacher> getBaseTeacher(@Param("bid") Integer bid, @Param("departmentId") Integer departmentId, @Param("year") String year);

    List<TeacherDeptVO> getTeacherSelfInfo(Integer teacherId);
}
